package security;

import java.io.IOException;

/**
 * Abstract class for additional channel-features. (Decorator-Pattern)
 * 
 * @author Lukas
 *
 */
public abstract class ChannelDecorator implements Channel {
	protected Channel channel;

	@Override
	public void send(String message) throws IOException {
		channel.send(message);
	}
	
	@Override
	public String receive() throws IOException {
		return channel.receive();
	}
	
	@Override
	public void close() throws IOException {
		if (channel != null) {
			channel.close();
		}
	}
}
